home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 134 / Tiger_Disk_134_20xx_Tiger-Crew-Disk_de_Side_B.d64 / bad blox (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  106 lines

  1. 10 dim t(120),s(120)
  2. 20 gosub10000
  3. 30 poke211,11:poke214,18:sys58732
  4. 40 print"[158]check or [146]validate"
  5. 45 printtab(15)"[153]_[146] = exit[158]"
  6. 50 poke198,0:wait198,1
  7. 60 getw$:ifw$<>"c"andw$<>"v"andw$<>"_"then 50
  8. 70 ifw$="_"thenprint"good bye...!":end
  9. 160 poke 211,5:poke 214,18:sys 58732
  10. 170 print "[158]insert disk and press any key"
  11. 200 poke 198,0:wait 198,1
  12. 210 close 15:open 15,8,15,"i"
  13. 220 input#15,e,em$,et,es
  14. 230 if e<20 then 260
  15. 240 print tab(5)"[145][158]no disk or disk not formatted":ti$="000000"
  16. 250 wait 161,1:close 15:goto 20
  17. 260 if w$="v" then 1000
  18. 410 gosub 20000:x=0:for t=1 to 35:poke 211,t+2:poke 214,21:sys 58732
  19. 420 w=176:s=0:gosub 1210
  20. 430 f=0:if e<>1 then f=1
  21. 440 sm=20+2*(t>17)+(t>24)+(t>30)
  22. 450 for s=0 to sm:if f=1 then e=2:goto 470
  23. 460 w=128:gosub 1210:if e>128 then e=2
  24. 470 if e<>1 then print "";:x=x+1:t(x)=t:s(x)=s:goto 490
  25. 480 print "";
  26. 490 print "[209][145][157]";
  27. 500 if x<120 then next s,t:goto 530
  28. 510 gosub 10000:poke 211,12:poke 214,18:sys 58732
  29. 520 print "[158]unrepairable disk!":goto 650
  30. 530 close 15
  31. 540 if x<>0 then 570
  32. 550 gosub 10000:poke 211,13:poke 214,18:sys 58732:print "[158]perfect disk!";
  33. 560 ti$="000000":wait 161,2:goto 20
  34. 570 poke 211,23:poke 214,1:sys 58732:print "bad muthas";
  35. 580 ti$="000000":wait 161,1
  36. 590 for y=1 to x
  37. 600 if t(y)<>18 then next y:goto 660
  38. 610 gosub 10000:poke 211,8:poke 214,18:sys 58732
  39. 620 print"[158]detected bad-blox on track 18!"
  40. 630 print "  transfer your files to another disk!"
  41. 640 print "    reformat the disk and try again!"
  42. 650 ti$="000000":wait 161,2:goto 20
  43. 660 open 15,8,15,"s:>>bad-bloz v2.<<"
  44. 670 input#15,e:if e<>1 then 750
  45. 675 print#15,"v":input#15,e:if e>19 then 720
  46. 680 for y=1 to x
  47. 690 print#15,"b-a:"0;t(y);s(y)
  48. 700 input#15,e:if e<>65 then 740
  49. 710 gosub 10000:poke 211,9:poke 214,18:sys 58732
  50. 720 print "[158]a file has bad-blox!!!!"
  51. 730 goto 630
  52. 740 if e<20 then next y:goto 780
  53. 750 gosub 10000:poke 211,14:poke 214,18:sys 58732
  54. 760 print "[158]disk error"
  55. 770 close 2:close 15:ti$="000000":wait 161,1:goto 20
  56. 780 gosub 10000:poke 211,5:poke 214,18:sys 58732
  57. 790 print "[158]creating >>bad-blox v2.<< file"
  58. 800 close 15:open 15,8,15,"u;":open 2,8,2,">>bad-blox v2.<<,s,w"
  59. 810 input#15,e:if e>19 then 750
  60. 820 print#2,x
  61. 830 for y=1 to x:print#2,t(y):print#2,s(y):next y:close 2:close 15:goto 1190
  62. 1000 open 2,8,2,">>bad-blox v2.<<,s,r"
  63. 1010 input#15,e:if e=62 then 1030
  64. 1020 if e>19 then 750
  65. 1030 close 2:print#15,"v"
  66. 1040 input#15,w:if w>19 then 750
  67. 1050 if e=62 then 1140
  68. 1060 open 2,8,2,">>bad-blox v2.<<,s,r":input#2,x
  69. 1070 gosub 20000:for y=1 to x
  70. 1080 input#2,t(y):input#2,s(y):next y
  71. 1100 for y=1 to x:poke 211,t(y)+2:poke 214,21-s(y):sys 58732:print "[209]";
  72. 1110 print#15,"b-a";0;t(y);s(y)
  73. 1120 next y
  74. 1130 poke 211,23:poke 214,1:sys 58732:print "bad mutha";
  75. 1140 ti$="000000":wait 161,1
  76. 1190 gosub 10000:poke 211,15:poke 214,18:sys 58732
  77. 1200 print"[158]complete":ti$="000000":wait 161,2:goto 20
  78. 1210 print#15,"m-w"chr$(8)chr$(0)chr$(2)chr$(t)chr$(s)
  79. 1220 print#15,"m-w"chr$(1)chr$(0)chr$(1)chr$(w)
  80. 1230 ti$="000000":wait 162,1
  81. 1240 print#15,"m-r"chr$(1)chr$(0):get#15,a$:e=peek(512)
  82. 1250 if ti<180 and e>127 then 1240
  83. 1260 return
  84. 10000 poke 53280,4:poke 53281,4
  85. 10010 print "[147][151]v2.0":print tab(11)"[158][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]"
  86. 10020 print tab(11)" [146][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][158] "
  87. 10030 print tab(11)" [146][191][191]  bad-blox  [157] [191][191][158] "
  88. 10040 print tab(11)" [146][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][158] "
  89. 10050 print tab(11)"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  90. 10120 return
  91. 20000 poke 53280,0:print "[147][158]";
  92. 20010 print "  [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
  93. 20020 print "20[179]";spc(17);"[194]"
  94. 20030 print "19[179]";spc(17);"[173][195][195][195][195][195][195][174]"
  95. 20040 print "18[179]";spc(24);"[173][195][195][195][195][195][174]"
  96. 20050 print "17[179]";spc(30);"[173][195][195][195][195][174]"
  97. 20060 for z=16 to 0 step-1:a$=str$(z):a$=right$(a$,2)
  98. 20070 if len(a$)=1 then a$="0"+a$
  99. 20080 print a$;"[179]";spc(35);"[194]":next z
  100. 20090 print "  [173][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][189] ";
  101. 20100 print "            11111111112222222222333333  ";
  102. 20110 print "   12345678901234567890123456789012345";
  103. 20120 print "";:for t=1 to 35:poke 211,t+2:poke 214,21:sys 58732
  104. 20130 sm=20+2*(t>17)+(t>24)+(t>30)
  105. 20140 for s=0 to sm:print "[215][145][157]";:next s:next t:return
  106.